ColorSync 2.5 provides AppleScript support that allows users to script many common color-matching tasks. To provide this support, ColorSync now runs as a faceless background application (one with no user interface), rather than as a standard extension. By running as a background application, ColorSync can avoid namespace collisions and time-outs during long operations, and it can have its own AppleScript dictionary.
ColorSync provides scriptable support for getting and setting the following properties:
For the following, you can only get, not set, the property:
Location is the only property currently supported for profiles, but future support is planned for additional profile properties.
ColorSync supports the following scriptable operations:
Scriptable image operations currently work only on TIFF files, but support for other formats is planned.
The scripting framework uses a plug-in architecture that is fully accessible to third-party scripting plug-ins. When a user invokes a script to perform a ColorSync operation on an image, ColorSync (operating as a faceless background application) automatically builds a list of all available scripting plug-ins. It then attempts to call each of the plug-ins in the list until one of them successfully executes the desired operation. To appear in the list, a plug-in must meet the following criteria:
'shlb'
).
'cfrg'
resource) must be unique (among all currently loaded shared libraries) and begin with
'CSSP'
. For example, you might want to name the library by appending your creator type to
'CSSP'.
The ColorSync SDK includes several sample scripts that demonstrate how to perform common operations. You can use the scripts as is, or borrow from them for your own custom scripts. For more information, see the detailed Read Me files that accompany the sample scripts.